Skip to content

Add performance tests#309700

Draft
pwang347 wants to merge 13 commits intomainfrom
pawang/perfTesting
Draft

Add performance tests#309700
pwang347 wants to merge 13 commits intomainfrom
pawang/perfTesting

Conversation

@pwang347
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 14, 2026 02:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

Screenshot Changes

Base: cf7f246a Current: 67b3ebe4

Changed (36)

sessions/aiCustomizationShortcutsWidget/Expanded/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithMcpServers/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithCounts/Light
Before After
before after
chat/aiStats/AiStatsHover/Light
Before After
before after
sessions/aiCustomizationShortcutsWidget/Expanded/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithMcpServers/Dark
Before After
before after
sessions/aiCustomizationShortcutsWidget/WithCounts/Dark
Before After
before after
chat/aiStats/AiStatsHover/Dark
Before After
before after
chat/artifacts/chatArtifacts/MultiSourceExpanded/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationListWidget/InstructionsTabWithItems/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationListWidget/InstructionsTabWithItems/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePagePromptLaunchers/Light
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePageSelectorPromptLaunchers/Light
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePagePromptLaunchers/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationWelcomePages/WelcomePageSelectorPromptLaunchers/Dark
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Dark
Before After
before after
agentSessionsViewer/FailedWithoutDuration/Light
Before After
before after
agentSessionsViewer/WithBadge/Light
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Light
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Light
Before After
before after
agentSessionsViewer/ClaudeProvider/Light
Before After
before after
agentSessionsViewer/WithBadge/Dark
Before After
before after
agentSessionsViewer/WithMarkdownBadge/Dark
Before After
before after
agentSessionsViewer/WithBadgeAndDiff/Dark
Before After
before after
agentSessionsViewer/ClaudeProvider/Dark
Before After
before after

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new chat-focused performance benchmarking harness to the repository, including a CI workflow for comparing baseline vs test builds. This fits into the existing scripts/ perf tooling by providing repeatable end-to-end chat timing/rendering/memory measurements backed by a deterministic mock LLM server.

Changes:

  • Introduce chat perf regression runner + leak checker scripts under scripts/chat-perf/ (Playwright + CDP-based metrics).
  • Add a local mock LLM server and shared utilities for build resolution, launch args/env, and statistical comparison.
  • Wire up npm scripts, CI workflow, and documentation for running these benchmarks.
Show a summary per file
File Description
scripts/chat-perf/test-chat-perf-regression.js Runs scenario-based chat perf benchmarks and compares against a baseline build.
scripts/chat-perf/test-chat-mem-leaks.js Sends repeated chat messages in one session and detects monotonic heap/DOM growth.
scripts/chat-perf/common/utils.js Shared helpers for build download/launch configuration and statistics.
scripts/chat-perf/common/mock-llm-server.js Local deterministic streaming server that emulates Copilot/OpenAI-style endpoints.
package.json Adds perf:chat and perf:chat-leak npm entry points.
.gitignore Ignores .chat-perf-data output directory.
.github/workflows/chat-perf.yml Adds a manual workflow to compare baseline vs test build performance and publish artifacts/summary.
.github/skills/chat-perf/SKILL.md Documents how to run the new perf and leak tools and interpret results.

Copilot's findings

  • Files reviewed: 7/8 changed files
  • Comments generated: 8

Comment thread scripts/chat-simulation/test-chat-mem-leaks.js Outdated
Comment thread scripts/chat-simulation/test-chat-mem-leaks.js Outdated
Comment thread .github/workflows/chat-perf.yml Outdated
Comment thread scripts/chat-simulation/common/utils.js
Comment thread scripts/chat-perf/common/utils.js Outdated
Comment thread scripts/chat-simulation/common/mock-llm-server.js Outdated
Comment thread scripts/chat-simulation/test-chat-perf-regression.js
Comment thread scripts/chat-simulation/test-chat-perf-regression.js Outdated
Comment thread .github/workflows/chat-perf.yml
try { await cdp.send('Tracing.end'); await new Promise(r => setTimeout(r, 200)); } catch { }
await cdp.send('Tracing.start', {
traceConfig: {
includedCategories: ['v8.gc', 'devtools.timeline'],
Copy link
Copy Markdown
Collaborator

@deepak1556 deepak1556 Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats the reason behind not using the existing trace infra in the runtime ? --enable-tracing and --trace-startup-file. Our current startup perf module relies on it to extract relevant category details https://github.com/microsoft/vscode-perf/blob/9c76748df860a2cd54396fc437a78b4ab2b7c79a/src/perf.ts#L175-L186 for example.

You could extract the heap usages (from gc metrics), cpu samples, perf markers from a unified trace instead of injecting process global performance observers right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants